﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TeaCompiler.CodeDom {

    /// <summary>
    /// 代表字词类型。
    /// </summary>
    public enum TokenType : byte {

        #region Control

        /// <summary>
        /// 非法字符。
        /// </summary>
        Illegal,

        /// <summary>
        /// 表示流为空。 (EndOfFlow 简写)
        /// </summary>
        EOF,

        #endregion

        #region Punctuations

        /// <summary>
        /// (
        /// </summary>
        LParam,

        /// <summary>
        /// )
        /// </summary>
        RParam,

        /// <summary>
        /// [
        /// </summary>
        LBrack,

        /// <summary>
        /// ]
        /// </summary>
        RBrack,

        /// <summary>
        /// {
        /// </summary>
        LBrace,

        /// <summary>
        /// }
        /// </summary>
        RBrace,

        /// <summary>
        /// :
        /// </summary>
        Colon,

        /// <summary>
        /// ;
        /// </summary>
        Semicolon,

        #endregion

        #region Operators

        #region Unary

        /// <summary>
        /// assert
        /// </summary>
        Assert,

        /// <summary>
        /// trace
        /// </summary>
        Trace,

        /// <summary>
        /// new
        /// </summary>
        New,

        /// <summary>
        /// typeof
        /// </summary>
        Typeof,

        /// <summary>
        /// ++
        /// </summary>
        Inc,

        /// <summary>
        /// --
        /// </summary>
        Dec,

        /// <summary>
        /// !
        /// </summary>
        Not,

        /// <summary>
        /// ~
        /// </summary>
        BitNot,

        /// <summary>
        /// delete
        /// </summary>
        Delete,

        /// <summary>
        /// await
        /// </summary>
        Await,

        #endregion

        #region Binary

        /// <summary>
        /// +
        /// </summary>
        Add,

        /// <summary>
        /// -
        /// </summary>
        Sub,

        /// <summary>
        /// &amp;
        /// </summary>
        BitAnd,

        /// <summary>
        /// *
        /// </summary>
        Mul,

        /// <summary>
        /// ..
        /// </summary>
        PeriodChain,

        /// <summary>
        /// =&gt;
        /// </summary>
        Lambda,

        /// <summary>
        /// .
        /// </summary>
        Period,

        /// <summary>
        /// -&gt;
        /// </summary>
        Pointer,

        /// <summary>
        /// /
        /// </summary>
        Div,

        /// <summary>
        /// %
        /// </summary>
        Mod,

        /// <summary>
        /// &lt;&lt;
        /// </summary>
        Shl,

        /// <summary>
        /// &gt;&gt;
        /// </summary>
        Shr,

        /// <summary>
        /// &lt;
        /// </summary>
        Lt,

        /// <summary>
        /// &gt;
        /// </summary>
        Gt,

        /// <summary>
        /// &lt;=
        /// </summary>
        Lte,

        /// <summary>
        /// &gt;=
        /// </summary>
        Gte,

        /// <summary>
        /// as
        /// </summary>
        As,

        /// <summary>
        /// is
        /// </summary>
        Is,

        /// <summary>
        /// in
        /// </summary>
        In,

        /// <summary>
        /// to
        /// </summary>
        To,

        /// <summary>
        /// ==
        /// </summary>
        Eq,

        /// <summary>
        /// !=
        /// </summary>
        Ne,

        /// <summary>
        /// ^
        /// </summary>
        BitXOr,

        /// <summary>
        /// |
        /// </summary>
        BitOr,

        /// <summary>
        /// &amp;&amp;
        /// </summary>
        And,

        /// <summary>
        /// ||
        /// </summary>
        Or,

        /// <summary>
        /// ??
        /// </summary>
        CheckNull,

        /// <summary>
        /// or
        /// </summary>
        OrReturn,

        #endregion

        #region Assign

        /// <summary>
        /// =
        /// </summary>
        Assign,

        /// <summary>
        /// :=
        /// </summary>
        AssignCopy,

        /// <summary>
        /// :=:
        /// </summary>
        AssignAll,

        /// <summary>
        /// |=
        /// </summary>
        AssignBitOr,

        /// <summary>
        /// ^=
        /// </summary>
        AssignBitXOr,

        /// <summary>
        /// &amp;=
        /// </summary>
        AssignBitAnd,

        /// <summary>
        /// &lt;&lt;=
        /// </summary>
        AssignShl,

        /// <summary>
        /// &gt;&gt;=
        /// </summary>
        AssignShr,

        /// <summary>
        /// +=
        /// </summary>
        AssignAdd,

        /// <summary>
        /// -=
        /// </summary>
        AssignSub,

        /// <summary>
        /// *=
        /// </summary>
        AssignMul,

        /// <summary>
        /// /=
        /// </summary>
        AssignDiv,

        /// <summary>
        /// %=
        /// </summary>
        AssignMod,

        #endregion

        /// <summary>
        /// ?
        /// </summary>
        Conditional,

        /// <summary>
        /// ,
        /// </summary>
        Comma,

        #endregion

        #region Keywords

        /// <summary>
        /// base
        /// </summary>
        Base,

        /// <summary>
        /// break
        /// </summary>
        Break,

        /// <summary>
        /// case
        /// </summary>
        Case,

        /// <summary>
        /// catch
        /// </summary>
        Catch,

        /// <summary>
        /// const。
        /// </summary>
        Const,

        /// <summary>
        /// continue
        /// </summary>
        Continue,

        /// <summary>
        /// debugger
        /// </summary>
        Debugger,

        /// <summary>
        /// default
        /// </summary>
        Default,

        /// <summary>
        /// do
        /// </summary>
        Do,

        /// <summary>
        /// else
        /// </summary>
        Else,

        /// <summary>
        /// finally
        /// </summary>
        Finally,

        /// <summary>
        /// for
        /// </summary>
        For,

        /// <summary>
        /// function
        /// </summary>
        Function,

        /// <summary>
        /// goto
        /// </summary>
        Goto,

        /// <summary>
        /// if
        /// </summary>
        If,

        /// <summary>
        /// import
        /// </summary>
        Import,

        /// <summary>
        /// let
        /// </summary>
        Let,

        /// <summary>
        /// lock
        /// </summary>
        Lock,

        /// <summary>
        /// loop
        /// </summary>
        Loop,

        /// <summary>
        /// native。
        /// </summary>
        Native,

        /// <summary>
        /// once
        /// </summary>
        Once,

        /// <summary>
        /// operator
        /// </summary>
        Operator,

        ///// <summary>
        ///// params
        ///// </summary>
        //Params,

        /// <summary>
        /// ref
        /// </summary>
        Ref,

        /// <summary>
        /// return
        /// </summary>
        Return,

        /// <summary>
        /// switch
        /// </summary>
        Switch,

        /// <summary>
        /// this
        /// </summary>
        This,

        /// <summary>
        /// throw
        /// </summary>
        Throw,

        /// <summary>
        /// try
        /// </summary>
        Try,

        /// <summary>
        /// var
        /// </summary>
        Var,

        /// <summary>
        /// while
        /// </summary>
        While,

        #endregion

        #region Modifiers

        /// <summary>
        /// class
        /// </summary>
        Class,

        /// <summary>
        /// struct
        /// </summary>
        Struct,

        /// <summary>
        /// enum
        /// </summary>
        Enum,

        /// <summary>
        /// interface
        /// </summary>
        Interface,

        /// <summary>
        /// extends
        /// </summary>
        Extends,

        /// <summary>
        /// event
        /// </summary>
        Event,

        /// <summary>
        /// public
        /// </summary>
        Public,

        /// <summary>
        /// internal
        /// </summary>
        Internal,

        /// <summary>
        /// protected
        /// </summary>
        Protected,

        /// <summary>
        /// private
        /// </summary>
        Private,

        /// <summary>
        /// final
        /// </summary>
        Final,

        /// <summary>
        /// static
        /// </summary>
        Static,

        /// <summary>
        /// abstract
        /// </summary>
        Abstract,

        /// <summary>
        /// virtual
        /// </summary>
        Virtual,

        /// <summary>
        /// override
        /// </summary>
        Override,

        /// <summary>
        /// volatile
        /// </summary>
        Volatile,

        #endregion

        #region Literal

        /// <summary>
        /// 标识符。
        /// </summary>
        Identifier,

        /// <summary>
        /// null
        /// </summary>
        NullLiteral,

        /// <summary>
        /// true
        /// </summary>
        TrueLiteral,

        /// <summary>
        /// false
        /// </summary>
        FalseLiteral,

        /// <summary>
        /// 数字。
        /// </summary>
        IntLiteral,

        /// <summary>
        /// 十六进制数字。
        /// </summary>
        HexLiteral,

        /// <summary>
        /// 数字。
        /// </summary>
        LongLiteral,

        /// <summary>
        /// 数字。
        /// </summary>
        UIntLiteral,

        /// <summary>
        /// 数字。
        /// </summary>
        ULongLiteral,

        /// <summary>
        /// 十进制数字。
        /// </summary>
        DecimalLiteral,

        /// <summary>
        /// 双浮点数字。
        /// </summary>
        DoubleLiteral,

        /// <summary>
        /// 单浮点数字。
        /// </summary>
        FloatLiteral,

        /// <summary>
        /// 字符串。
        /// </summary>
        StringLiteral,

        /// <summary>
        /// 字符串。
        /// </summary>
        CharLiteral,

        /// <summary>
        /// 字符。
        /// </summary>
        TemplateStringLiteral,

        /// <summary>
        /// 字符。
        /// </summary>
        TemplateCharLiteral,

        /// <summary>
        /// 字符。
        /// </summary>
        DataLiteral,

        #endregion

        ///// <summary>
        ///// //
        ///// </summary>
        //SingleLineComment,

        ///// <summary>
        ///// /*
        ///// </summary>
        //MultiLineComment,

        ///// <summary>
        ///// ///
        ///// </summary>
        //SingleLineDocComment,

        ///// <summary>
        ///// /**
        ///// </summary>
        //MultiLineDocComment,

        ///// <summary>
        ///// @
        ///// </summary>
        //At,

    }

}
